Description

Global results allows you to define result mappings which will be used as defaults for all action configurations and will be automatically inherited by all action configurations in this package and all packages which extend this package. In other words, if you have the same result specified within multiple actions, then you can define it as a global result.

Example

<package name="default">
....
<global-results> 
    <result name="login" type="dispatcher"> 
        <param name="location">login.jsp</param> 
    </result> 
</global-results> 
<action name="foo"  class="mypackage.fooAction">
    <result name="success" type="dispatcher">bar.jsp</result> 
</action>
<action name="submitForm"  class="mypackage.submitFormAction">
    <result name="success" type="dispatcher">submitSuccess.jsp</result> 
</action>
...
</package>

Same thing

<package name="default">
....
<action name="foo"  class="mypackage.fooAction">
    <result name="success" type="dispatcher">bar.jsp</result> 
    <result name="login" type="dispatcher">login.jsp</result> 
</action>
<action name="submitForm"  class="mypackage.submitFormAction">
    <result name="success" type="dispatcher">submitSuccess.jsp</result>
    <result name="login" type="dispatcher">login.jsp</result>  
</action>
...
</package>